Automattic\WooCommerce\StoreApi\Utilities\CartController D

Total Complexity 136
Dependencies 17
Dependents 5
Total lines 1,371
Lines of code 728
Logical lines of code 312
Comment lines 485
Methods 37
Properties 0

Methods 37

Method Rating Maintainability Complexity Lines of code
parse_variation_data()
A
42 14 51
validate_cart_items()
A
45 10 43
apply_coupon()
A
41 8 64
validate_cart_item()
A
45 9 45
validate_add_to_cart()
A
43 7 53
sanitize_variation_data()
A
49 7 36
add_to_cart()
S
41 4 66
get_shipping_packages()
S
54 7 21
stock_exceptions_to_wp_errors()
S
49 5 36
validate_cart_coupons()
S
53 5 23
get_error_message_for_stock_exception_type()
S
46 3 51
set_cart_item_quantity()
S
56 4 16
get_cart_errors()
S
60 4 13
get_variable_product_attributes()
S
60 4 13
validate_cart()
S
53 3 25
filter_request_data()
S
55 3 20
get_product_for_cart()
S
62 3 11
validate_cart_coupon()
S
59 2 16
get_cart_instance()
S
67 3 7
select_shipping_rate()
S
65 3 9
get_variation_id_from_variation_data()
S
60 2 13
get_package_name()
S
61 2 13
get_variation_id()
S
79 2 3
get_product_id()
S
78 2 3
get_product_quantity_in_cart()
S
70 2 6
load_cart()
S
68 2 8
get_cart_coupons()
S
74 2 4
get_cart_for_response()
S
78 2 3
get_cart_items()
S
74 2 4
get_cart_item()
S
74 2 4
add_product_names_to_message()
S
66 2 8
get_remaining_stock_for_product()
S
72 1 5
has_coupon()
S
76 1 4
get_cart_hashes()
S
63 1 10
throw_default_product_exception()
S
66 1 10
calculate_totals()
S
70 1 7
empty_cart()
S
77 1 4